package com.lez.flowpractice2.net

import okhttp3.OkHttpClient
import retrofit2.Retrofit
import retrofit2.converter.moshi.MoshiConverterFactory

object RetrofitClient {

//    val httpLoggingInterceptor = HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY)

    private val instance: Retrofit by lazy {
         Retrofit.Builder()
             .addConverterFactory(MoshiConverterFactory.create())
             .baseUrl("https://qqlykm.cn/api/baidu/bkh.php")
             .client(OkHttpClient.Builder().build())
             .build()
    }


    val articleApi:ArticleApi by lazy {
        instance.create(ArticleApi::class.java)
    }
}